import config from './config.js'

export default (url, data={},method='GET') => {
	return new Promise((resolve, reject)=>{
		uni.request({
		    url: config.host + url, //仅为示例，并非真实接口地址。
		    data,
		    header: {
		    },
		    success: (res) => {
			   resolve(res.data);
		    }
		});
	})
}